package com.yantong.pay.yfz.domain.wallet;


import com.yantong.pay.yfz.domain.member.domain.withdraw.WithdrawRequest;
import com.yantong.pay.yfz.domain.wallet.domain.CustomerMemberRequest;
import com.yantong.pay.yfz.domain.wallet.domain.WalletResponse;
import com.yantong.pay.yfz.util.Config;
import com.yantong.pay.yfz.util.RemoteInvoker;

public class WalletHelper {
   
    
    /**
     * 上传附件
     * @throws Exception
     */
    public static WalletResponse uploadAttacheMent(WithdrawRequest request,String yplPrivateKey, String yplPrivateKeyPwd, String yplSignNo, String publicKeyFileUri) throws Exception{
        return RemoteInvoker.invoke(request, Config.getWalletAttachementUploadUrl(),yplPrivateKey,yplPrivateKeyPwd,yplSignNo,publicKeyFileUri,  WalletResponse.class);
    }
    
    /**
     * 新增会员
     * @throws Exception
     */
    public static WalletResponse addMember(CustomerMemberRequest request,String yplPrivateKey, String yplPrivateKeyPwd, String yplSignNo, String publicKeyFileUri) throws Exception{
        return RemoteInvoker.invoke(request, Config.getWalletMemberAddUrl(),yplPrivateKey,yplPrivateKeyPwd,yplSignNo,publicKeyFileUri,  WalletResponse.class);
    }
    
    /**
     * 更新会员
     * @throws Exception
     */
    public static WalletResponse updateMember(CustomerMemberRequest request,String yplPrivateKey, String yplPrivateKeyPwd, String yplSignNo, String publicKeyFileUri) throws Exception{
        return RemoteInvoker.invoke(request, Config.getWalletMemberUpdateUrl(),yplPrivateKey,yplPrivateKeyPwd,yplSignNo,publicKeyFileUri,  WalletResponse.class);
    }
    
    /**
     * 查询会员信息
     * @throws Exception
     */
    public static WalletResponse queryMember(CustomerMemberRequest request,String yplPrivateKey, String yplPrivateKeyPwd, String yplSignNo, String publicKeyFileUri) throws Exception{
        return RemoteInvoker.invoke(request, Config.getWalletMemberQueryUrl(),yplPrivateKey,yplPrivateKeyPwd,yplSignNo,publicKeyFileUri,  WalletResponse.class);
    }
    
}
